import $H from "../request";
// 登录方法
export function login(data) {
  return $H.request({
    url: `/login`,
    method: "post",
    data,
  });
}

// 获取登录信息
export function getInfo() {
  return $H.request({
    url: `/getInfo`,
    method: "get",
  });
}

// 根据字典类型查询字典数据信息
export function getListByDictType(dictType) {
  const data = {
    dictType: dictType,
  };
  return $H.request({
    url: "/sys/dict/data/getListByDictType",
    method: "post",
    data,
  });
}

//上传文件
export function uploadFile(data) {
  return $H.request({
      url: '/sys/file/upload',
      method: 'post',
      data
  })
}